<template>
<div>
  <div class="banner">
    <img class="banner-img" src="//img1.qunarzz.com/sight/p0/1910/e8/e8e2083829389f26a3.water.jpg_600x330_fda96a8a.jpg" @click="bannerclick"/>
    <div class="banner-header" @click="bannerclick">
      <div class="header-p">世界之窗(AAAAA景区)</div>
      <div class="header-img">
        <span class="iconfont img-size">&#xe721;</span>
        20
      </div>
    </div>
    <CommonGallary :img="img" v-show="bannershow" @close="bannerclose"></CommonGallary>
  </div>
</div>
</template>

<script>
import CommonGallary from 'common/gallary/Gallary'
export default {
  name: 'DetailBanner',
  data () {
    return {
      img: ['//img1.qunarzz.com/sight/p0/1910/e8/e8e2083829389f26a3.water.jpg_600x330_fda96a8a.jpg', 'http://img1.qunarzz.com/sight/p0/1910/d2/d24270edd91047c0a3.water.jpg_350x240_de246f2d.jpg', 'http://img1.qunarzz.com/sight/p0/1910/fe/fe5f8a8c124ae96ea3.img.jpg_350x240_5ffe0e6a.jpg', 'http://img1.qunarzz.com/sight/p0/1904/c2/c26e1e4ffe899843a3.water.jpg_350x240_8b8a93ab.jpg', 'http://img1.qunarzz.com/sight/p0/1902/f8/f855cec6c668dc6da3.water.jpg_350x240_f9ff6f4e.jpg', 'http://img1.qunarzz.com/sight/p0/1505/55/55978d709ae63850.water.jpg_350x240_eb06f927.jpg'],
      bannershow: false
    }
  },
  methods: {
    bannerclick () {
      this.bannershow = true
    },
    bannerclose () {
      this.bannershow = false
    }
  },
  components: {
    CommonGallary
  }
}
</script>

<style lang="stylus" scoped>
.banner
  overflow: hidden
  height: 0
  padding-bottom: 55%
  position: relative
  .banner-img
    width: 100%
  .banner-header
    display: flex
    position: absolute
    left: 0
    right: 0
    bottom: 0
    color: #fff
    .header-p
      flex: 1
      height: 3rem
      line-height: 3rem
      padding: 0 .4rem
      font-size: 1.4rem
    .header-img
      padding: 0 .8rem
      height: 1.4rem
      line-height: 1.4rem
      background: #101010
      border-radius: .8rem
      margin-top: 1rem
      font-size: 1.2rem
      .img-size
        font-size: 1.4rem
</style>
